
#ifndef GL_DEBUG_DRAWER_H
#define GL_DEBUG_DRAWER_H

#import "btIDebugDraw.h"
#import "sio2.h"
#import "sio2_gl.h"

extern "C"
{
#include <OpenGLES/EAGL.h>
#include <OpenGLES/ES1/gl.h>
#include <OpenGLES/ES1/glext.h>
}

class GLDebugDrawer : public btIDebugDraw
{
	int m_debugMode;
	
public:
	
	GLDebugDrawer();
	
	virtual void   drawLine(const btVector3& from,const btVector3& to,const btVector3& color);
	
	virtual void   drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color);
	
	virtual void   reportErrorWarning(const char* warningString);
	
	virtual void   draw3dText(const btVector3& location,const char* textString);
	
	virtual void   setDebugMode(int debugMode);
	
	virtual int      getDebugMode() const { return m_debugMode;}
	
};


void _debug_point( vec3 *_pt );
void _debug_line( vec3 *_pt0, vec3 *_pt1 );



#endif